import static org.junit.Assert.*;

import org.junit.Test;

public class ArrayPracticeTest {
	@Test
	public void testMinimumPosition() {
		int[] testArray = new int[] { 1, 2, 3 };
		ArrayPractice ap = new ArrayPractice(testArray);
		if (ap.minimumPosition(0) != 0)
			fail("testMinimumPosition " + ap.minimumPosition(0));
	}

	@Test
	public void testSwap() {
		int[] testArray = new int[] { 1, 2, 3 };
		ArrayPractice ap = new ArrayPractice(testArray);
		ap.swap(0, 2);
		if (!ap.printArray(0, 2).equals("3,2,1"))
			fail("Fail!");
	}

	@Test
	public void testPrintArray() {
		int[] testArray = new int[] { 1, 2, 3 };
		ArrayPractice ap = new ArrayPractice(testArray);
		if (!ap.printArray(0, 2).equals("1,2,3"))
			fail("Fail!");
	}

}
